# 应用内路由
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import CityViewSet, IDCViewSet, HostViewSet, PingHostAPIView

router = DefaultRouter()
router.register("cities", CityViewSet)
router.register("idcs", IDCViewSet)
router.register("hosts", HostViewSet)

urlpatterns = [
    path("", include(router.urls)),
    path("hosts/<int:host_id>/ping/", PingHostAPIView.as_view(), name="host-ping"),
]
